home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Advanced V211776152001.psc / frmScreen.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-04-13  |  1.7 KB  |  51 lines

  1. VERSION 5.00
  2. Begin VB.Form frmScreen 
  3.    BorderStyle     =   0  'None
  4.    ClientHeight    =   2475
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   2670
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    MinButton       =   0   'False
  11.    ScaleHeight     =   2475
  12.    ScaleWidth      =   2670
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   3  'Windows Default
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.PictureBox Picture1 
  17.       Appearance      =   0  'Flat
  18.       BorderStyle     =   0  'None
  19.       ForeColor       =   &H80000008&
  20.       Height          =   2055
  21.       Left            =   90
  22.       ScaleHeight     =   2055
  23.       ScaleWidth      =   2250
  24.       TabIndex        =   0
  25.       Top             =   135
  26.       Width           =   2250
  27.    End
  28. Attribute VB_Name = "frmScreen"
  29. Attribute VB_GlobalNameSpace = False
  30. Attribute VB_Creatable = False
  31. Attribute VB_PredeclaredId = True
  32. Attribute VB_Exposed = False
  33. Option Explicit
  34. '------------------ picks a color from the copy of the screen in picture1 ------
  35. Private Sub GetColorFromScreen(xMousePos As Single, yMousePos As Single)
  36.     Dim mColor As Long
  37.     mColor = Me.Picture1.Point(xMousePos, yMousePos)
  38.     frmColorPicker.ShowColors mColor
  39. End Sub
  40. Private Sub Form_Activate()
  41.     frmColorPicker.Show
  42. End Sub
  43. Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  44.     GetColorFromScreen x, y
  45.     frmColorPicker.btPick.Enabled = True
  46.     Unload Me
  47. End Sub
  48. Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  49.     GetColorFromScreen x, y
  50. End Sub
  51.